﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.IO;
using System.ServiceModel.Web;

namespace GmaWebService.Interfaces
{
    [ServiceContract]
    public interface IStreamingService
    {
        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        Byte[] GetFile(string filePath);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        Stream GetImage(string path);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        Stream GetImageResized(string path, int maxWidth, int maxHeight);

        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare)]
        Stream GetMediaItem(MediaItemType type, string itemId);

        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare)]
        Stream RetrieveStream(string identifier);

        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare)]
        Stream ExtractImage(MediaItemType type, string itemId, int position);

        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare)]
        Stream ExtractImageResized(MediaItemType type, string itemId, int position, int maxWidth, int maxHeight);
    }
}
